<template>
	<view>
		<view class="" v-for="(item,index) in list" :key="index">
			<view @click="itemClick(item)" class="itemView">
				<view class="flex-row-center" style="padding: 0 18rpx;width: 100%;">
					<view class="image1">
						<image class="" :src="item.image" mode="aspectFill"></image>
					</view>

					<view class="flex1 ">
						<view class="itemTitle ">
							{{item.title}}
						</view>
						<view class="flex-row-flex-start" style="margin-top: 16rpx;">
							<image class="timeImage" src="/static/home/money.png" mode=""></image>
							<view class="timeTitle">
								{{item.start_time}}
							</view>
						</view>
						<view class="flex-row-flex-start" style="margin-top: 16rpx;">
							<image class="timeImage" src="/static/home/address.png" mode=""></image>
							<view class="timeTitle">
								{{item.city}}-{{item.address}}
							</view>
						</view>
						<view class="flex-row-flex-start" style="margin-top: 16rpx;">
							<image class="timeImage" src="/static/home/time.png" mode=""></image>
							<view class="timeTitle">
								活动费用: <text v-if="item.fee_type==1">我方承担</text>
								<text v-if="item.fee_type==2">全部AA</text>
								<text v-if="item.fee_type==3">对方承担</text>
								<text style="margin-left: 10rpx;"> <text v-if="item.status==1">
										报名:({{item.user_list.length}}/{{item.max}})</text>
									<text v-if="item.status==2">参与:({{item.pitch_on_list.length}}/{{item.max}})</text>
									<text v-if="item.status==3">参与:({{item.pitch_on_list.length}}/{{item.max}})</text>


								</text>
							</view>
						</view>
					</view>
				</view>
				<view class="bview flex-row-space-between" style="padding-left: 40rpx;">
					<view class=" flex-row-flex-start">
						<view @click.stop="itemClick1(item)" class="headImage1View">
							<image :src="item.user_avatar" mode="aspectFill"></image>
						</view>
						<!-- <view v-if="item.status==1" class="flex-row-flex-start flex-wrap">
							<view v-if="index1<3" v-for="(item1,index1) in item.user_list" :key="index1">
								<view @click.stop="headImage1View(item1)" class="headImage1View">
									<image :src="item1.avatar" mode="aspectFill"></image>
								</view>

							</view>
						</view>
						<view v-else class="flex-row-flex-start flex-wrap">
							<view v-if="index1<3" v-for="(item1,index1) in item.pitch_on_list" :key="index1">
								<view @click.stop="headImage1View(item1)" class="headImage1View">
									<image :src="item1.avatar" mode="aspectFill"></image>
								</view>

							</view>
						</view> -->
						<!-- <view class="title1">
							<text v-if="item.status==1"> 等{{item.user_list.length}}人已报名</text>
							<text v-if="item.status==2">等{{item.pitch_on_list.length}}人参与</text>
							<text v-if="item.status==3">等{{item.pitch_on_list.length}}人参与</text>
						</view> -->
					</view>
					<view v-if="item.status==1" class="button flex-row-center">
						去报名
					</view>


				</view>
			</view>

		</view>


	</view>
</template>

<script>
	export default {
		name: "intelligent",
		data() {
			return {

			};
		},
		props: {
			list: {
				default: []
			},

		},
		created() {

		},
		methods: {
			itemClick(item) {
				console.log(item)
				if (!uni.getStorageSync('token')) {
					return uni.navigateTo({
						url: '/bundle/pages/login/login'
					})
				}
				uni.navigateTo({
					url: '/bundle/pages/my/intelligentDetail?id=' + item.id
				})

			},
			headImage1View(item) {
				if (!uni.getStorageSync('token')) {
					return uni.navigateTo({
						url: '/bundle/pages/login/login'
					})
				}
				uni.navigateTo({
					url: '/bundle/pages/my/intelligentDetail1?id=' + item.id
				})
			},
			itemClick1(item) {
				console.log(item)
				if (!uni.getStorageSync('token')) {
					return uni.navigateTo({
						url: '/bundle/pages/login/login'
					})
				}
				uni.navigateTo({
					url: '/bundle/pages/my/intelligentDetail1?id=' + item.user_id
				})

			},
			imagesClick1(item, index) {
				uni.previewImage({
					urls: item,
					current: index
				})
			},
			imagesClick(item, index) {
				uni.previewImage({
					urls: [item.avatar],
					current: 0
				})
			}
		}
	}
</script>

<style lang="scss">
	.itemView {
		position: relative;
		padding-top: 20rpx;
		height: 392rpx;
		margin: 30rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
	}

	.image1 {

		margin-right: 18rpx;
		width: 260rpx;
		height: 232rpx;
		border-radius: 20rpx;

		image {
			width: 100%;
			height: 100%;
			border-radius: 20rpx;
		}
	}

	.itemTitle {
		width: 374rpx;
		// text-align: left;
		// height:78rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 600;
		font-size: 34rpx;
		color: #1B1A1A;
	}

	.timeImage {
		margin-right: 4rpx;
		width: 28rpx;
		height: 28rpx;
	}

	.timeTitle {

		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 26rpx;
		color: #797979;
	}

	.bview {
		margin-top: 32rpx;
		height: 72rpx;
		background: #EEFFF0;
		border-radius: 60rpx 60rpx 60rpx 60rpx;
	}

	.headImage1View {
		margin-left: -20rpx;
		width: 60rpx;
		height: 60rpx;
		background: #f7f7f7;
		border-radius: 50%;

		image {
			width: 100%;
			height: 100%;
			border: 2rpx solid #FFFFFF;
			border-radius: 50%;
		}
	}

	.title1 {
		margin-left: 20rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 26rpx;
		color: #333333;
	}

	.button {
		width: 160rpx;
		height: 72rpx;
		background: linear-gradient(90deg, #00E89C 0%, #A2FF96 89%);
		border-radius: 40rpx 40rpx 40rpx 40rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 600;
		font-size: 30rpx;
		color: #FFFFFF;
	}
</style>